// **********************************************************************
//
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
// Ice version 3.4.1
package IceBox;
// <auto-generated>
//
// Generated from file `IceBox.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
/**
* An Observer interface implemented by admin clients
* interested in the status of services
*
* @see ServiceManager
*
**/
public final class ServiceObserverPrxHelper extends Ice.ObjectPrxHelperBase implements ServiceObserverPrx
{
public void
servicesStarted(String[] services)
{
servicesStarted(services, null, false);
}
public void
servicesStarted(String[] services, java.util.Map<String, String> __ctx)
{
servicesStarted(services, __ctx, true);
}
private void
servicesStarted(String[] services, java.util.Map<String, String> __ctx, boolean __explicitCtx)
{
if(__explicitCtx && __ctx == null)
{
__ctx = _emptyContext;
}
int __cnt = 0;
while(true)
{
Ice._ObjectDel __delBase = null;
try
{
__delBase = __getDelegate(false);
_ServiceObserverDel __del = (_ServiceObserverDel)__delBase;
__del.servicesStarted(services, __ctx);
return;
}
catch(IceInternal.LocalExceptionWrapper __ex)
{
__handleExceptionWrapper(__delBase, __ex);
}
catch(Ice.LocalException __ex)
{
__cnt = __handleException(__delBase, __ex, null, __cnt);
}
}
}
private static final String __servicesStarted_name = "servicesStarted";
public Ice.AsyncResult begin_servicesStarted(String[] services)
{
return begin_servicesStarted(services, null, false, null);
}
public Ice.AsyncResult begin_servicesStarted(String[] services, java.util.Map<String, String> __ctx)
{
return begin_servicesStarted(services, __ctx, true, null);
}
public Ice.AsyncResult begin_servicesStarted(String[] services, Ice.Callback __cb)
{
return begin_servicesStarted(services, null, false, __cb);
}
public Ice.AsyncResult begin_servicesStarted(String[] services, java.util.Map<String, String> __ctx, Ice.Callback __cb)
{
return begin_servicesStarted(services, __ctx, true, __cb);
}
public Ice.AsyncResult begin_servicesStarted(String[] services, Callback_ServiceObserver_servicesStarted __cb)
{
return begin_servicesStarted(services, null, false, __cb);
}
public Ice.AsyncResult begin_servicesStarted(String[] services, java.util.Map<String, String> __ctx, Callback_ServiceObserver_servicesStarted __cb)
{
return begin_servicesStarted(services, __ctx, true, __cb);
}
private Ice.AsyncResult begin_servicesStarted(String[] services, java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb)
{
IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __servicesStarted_name, __cb);
try
{
__result.__prepare(__servicesStarted_name, Ice.OperationMode.Normal, __ctx, __explicitCtx);
IceInternal.BasicStream __os = __result.__os();
Ice.StringSeqHelper.write(__os, services);
__os.endWriteEncaps();
__result.__send(true);
}
catch(Ice.LocalException __ex)
{
__result.__exceptionAsync(__ex);
}
return __result;
}
public void end_servicesStarted(Ice.AsyncResult __result)
{
__end(__result, __servicesStarted_name);
}
public boolean
servicesStarted_async(AMI_ServiceObserver_servicesStarted __cb, String[] services)
{
Ice.AsyncResult __r = begin_servicesStarted(services, null, false, __cb);
return __r.sentSynchronously();
}
public boolean
servicesStarted_async(AMI_ServiceObserver_servicesStarted __cb, String[] services, java.util.Map<String, String> __ctx)
{
Ice.AsyncResult __r = begin_servicesStarted(services, __ctx, true, __cb);
return __r.sentSynchronously();
}
public void
servicesStopped(String[] services)
{
servicesStopped(services, null, false);
}
public void
servicesStopped(String[] services, java.util.Map<String, String> __ctx)
{
servicesStopped(services, __ctx, true);
}
private void
servicesStopped(String[] services, java.util.Map<String, String> __ctx, boolean __explicitCtx)
{
if(__explicitCtx && __ctx == null)
{
__ctx = _emptyContext;
}
int __cnt = 0;
while(true)
{
Ice._ObjectDel __delBase = null;
try
{
__delBase = __getDelegate(false);
_ServiceObserverDel __del = (_ServiceObserverDel)__delBase;
__del.servicesStopped(services, __ctx);
return;
}
catch(IceInternal.LocalExceptionWrapper __ex)
{
__handleExceptionWrapper(__delBase, __ex);
}
catch(Ice.LocalException __ex)
{
__cnt = __handleException(__delBase, __ex, null, __cnt);
}
}
}
private static final String __servicesStopped_name = "servicesStopped";
public Ice.AsyncResult begin_servicesStopped(String[] services)
{
return begin_servicesStopped(services, null, false, null);
}
public Ice.AsyncResult begin_servicesStopped(String[] services, java.util.Map<String, String> __ctx)
{
return begin_servicesStopped(services, __ctx, true, null);
}
public Ice.AsyncResult begin_servicesStopped(String[] services, Ice.Callback __cb)
{
return begin_servicesStopped(services, null, false, __cb);
}
public Ice.AsyncResult begin_servicesStopped(String[] services, java.util.Map<String, String> __ctx, Ice.Callback __cb)
{
return begin_servicesStopped(services, __ctx, true, __cb);
}
public Ice.AsyncResult begin_servicesStopped(String[] services, Callback_ServiceObserver_servicesStopped __cb)
{
return begin_servicesStopped(services, null, false, __cb);
}
public Ice.AsyncResult begin_servicesStopped(String[] services, java.util.Map<String, String> __ctx, Callback_ServiceObserver_servicesStopped __cb)
{
return begin_servicesStopped(services, __ctx, true, __cb);
}
private Ice.AsyncResult begin_servicesStopped(String[] services, java.util.Map<String, String> __ctx, boolean __explicitCtx, IceInternal.CallbackBase __cb)
{
IceInternal.OutgoingAsync __result = new IceInternal.OutgoingAsync(this, __servicesStopped_name, __cb);
try
{
__result.__prepare(__servicesStopped_name, Ice.OperationMode.Normal, __ctx, __explicitCtx);
IceInternal.BasicStream __os = __result.__os();
Ice.StringSeqHelper.write(__os, services);
__os.endWriteEncaps();
__result.__send(true);
}
catch(Ice.LocalException __ex)
{
__result.__exceptionAsync(__ex);
}
return __result;
}
public void end_servicesStopped(Ice.AsyncResult __result)
{
__end(__result, __servicesStopped_name);
}
public boolean
servicesStopped_async(AMI_ServiceObserver_servicesStopped __cb, String[] services)
{
Ice.AsyncResult __r = begin_servicesStopped(services, null, false, __cb);
return __r.sentSynchronously();
}
public boolean
servicesStopped_async(AMI_ServiceObserver_servicesStopped __cb, String[] services, java.util.Map<String, String> __ctx)
{
Ice.AsyncResult __r = begin_servicesStopped(services, __ctx, true, __cb);
return __r.sentSynchronously();
}
public static ServiceObserverPrx
checkedCast(Ice.ObjectPrx __obj)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
try
{
__d = (ServiceObserverPrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::IceBox::ServiceObserver"))
{
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static ServiceObserverPrx
checkedCast(Ice.ObjectPrx __obj, java.util.Map<String, String> __ctx)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
try
{
__d = (ServiceObserverPrx)__obj;
}
catch(ClassCastException ex)
{
if(__obj.ice_isA("::IceBox::ServiceObserver", __ctx))
{
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
}
return __d;
}
public static ServiceObserverPrx
checkedCast(Ice.ObjectPrx __obj, String __facet)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::IceBox::ServiceObserver"))
{
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static ServiceObserverPrx
checkedCast(Ice.ObjectPrx __obj, String __facet, java.util.Map<String, String> __ctx)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
try
{
if(__bb.ice_isA("::IceBox::ServiceObserver", __ctx))
{
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
}
catch(Ice.FacetNotExistException ex)
{
}
}
return __d;
}
public static ServiceObserverPrx
uncheckedCast(Ice.ObjectPrx __obj)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
try
{
__d = (ServiceObserverPrx)__obj;
}
catch(ClassCastException ex)
{
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__obj);
__d = __h;
}
}
return __d;
}
public static ServiceObserverPrx
uncheckedCast(Ice.ObjectPrx __obj, String __facet)
{
ServiceObserverPrx __d = null;
if(__obj != null)
{
Ice.ObjectPrx __bb = __obj.ice_facet(__facet);
ServiceObserverPrxHelper __h = new ServiceObserverPrxHelper();
__h.__copyFrom(__bb);
__d = __h;
}
return __d;
}
protected Ice._ObjectDelM
__createDelegateM()
{
return new _ServiceObserverDelM();
}
protected Ice._ObjectDelD
__createDelegateD()
{
return new _ServiceObserverDelD();
}
public static void
__write(IceInternal.BasicStream __os, ServiceObserverPrx v)
{
__os.writeProxy(v);
}
public static ServiceObserverPrx
__read(IceInternal.BasicStream __is)
{
Ice.ObjectPrx proxy = __is.readProxy();
if(proxy != null)
{
ServiceObserverPrxHelper result = new ServiceObserverPrxHelper();
result.__copyFrom(proxy);
return result;
}
return null;
}
}